
// use "C:\Users\leejaemin\Dropbox\Work - RA\! (2024.11.03) Update\Request 6 updates\A01_Testdata.dta", replace
// cd "C:\Users\leejaemin\Dropbox\Work - RA\! (2024.11.03) Update\Request 6 updates"

use "D:\Dropbox\Work - RA\! (2024.11.03) Update\Request 6 updates\A01_Testdata.dta", replace
cd "D:\Dropbox\Work - RA\! (2025.03.03) Final replication code for RFS"


	
* Transformation & interaction term
rename rho1_est_SVOL_scorr_12_min10 est_rho1
gen est_rho1_trans=log((1+est_rho1)/(1-est_rho1))

* Require at least 5 obs per three months to estimate serial corr
replace est_rho1=. if N_SVOL_scorr_12_min10<5
replace est_rho1_trans=. if N_SVOL_scorr_12_min10<5


	
	
* Dev_dummy

eststo clear 

	eststo: reghdfe mom ln_io_EW est_rho1_trans amihud_m_cls_prc mktvol_mkt_dret, absorb(Dev_dummy)
	eststo: reghdfe rev ln_io_EW est_rho1_trans amihud_m_cls_prc mktvol_mkt_dret, absorb(Dev_dummy)
	
esttab using "Result_Table_8.csv", replace /// 
	sfmt(%-8.0f %-8.4f) t(2) dep legend star(* 0.10 ** 0.05 *** 0.01) ///
	title("Transformed Rho1") stats(N r2, labels("N Obs" "Adj-R2")) indicate(`r(indicate_fe)') 
	
	